<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html>
  <head>
    <link href="css/style.css" type="text/css" rel="stylesheet">
    <script type="text/javascript" src="bin/prototype.js"></script>
    <script type="text/javascript" src="bin/functions.js"></script>


    <title> LYON UNO </title>
  </head>

  <body>

    <div id="head_pic">
      <img src="images/title.png" alt="[LYON UNO]" id="picture">
    </div>

    <div id="webpage">
<a href="main.php"> Back to the main page</a>
<br>
<br>
<?php

	$hostDB = "localhost";
	$userDB = "ampersand";
	$passDB = "palomitas";
	$dbnameDB = "LYONUNO";

	$canalDB = mysql_connect($hostDB, $userDB, $passDB);
	$db = mysql_select_db($dbnameDB);
	$consulta = 'select nick,webpage,pict_URL from USERS order by nick asc';

	$resDB = mysql_db_query($dbnameDB, $consulta,$canalDB);

	echo "<table border = 2>";
	echo "<tr><td><h3>User</h3></td><td><h3>Webpage</h3></td><td><h3>Logo</h3></td></tr>";
	while($row = mysql_fetch_object($resDB)){
		$nick = $row->nick;
		$webp = $row->webpage;
		$img = $row->pict_URL;
		echo "<tr><td><b>" . $nick ."</b></td><td><a href=\"http://" . $webp . "\"  target=\"_blank\">".$webp."</a></td><td><img src=\"". $img ."\" width=120 height=120></img></td></tr>";
	}
	echo "</table>";
	mysql_free_result($resDB);
	mysql_close($canalDB);
?>

    </div>

    <div id="foot">
      <address>LYON UNO. CPE <br> 43, boulevard du 11 Novembre 1918. BP 2077 <br> 69616 Villeurbanne Cedex </address>
    </div>
  </body>
</html>
